package com.bagu;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/testConfiguration/bean")
public class HelloController {

    /*这里就是直接是注入一个hello的字符串*/
    @Autowired
    String hello;

    @GetMapping("/test")
    public String test(){
        System.out.println(hello);
        return hello;
    }

}